<!--
    Desenvolvido pela Fábrica de Software do CESUPA.
    Todos os direitos reservados.

    @author Breno Leite
-->

<ui:component xmlns="http://www.w3.org/1999/xhtml"
              xmlns:ui="http://java.sun.com/jsf/facelets"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:a4j="http://richfaces.org/a4j"
              xmlns:rich="http://richfaces.org/rich"
              xmlns:c="http://java.sun.com/jstl/core"
              xmlns:appcommons="http://www.fabsoft.cesupa.br/appcommons">

    <ui:insert name="top-section">
        <div id="top-bar">
            <h:form>
                <rich:toolBar styleClass="rich-toolbar" itemSeparator="line">
                    <rich:toolBarGroup>
                        Sexta, 3 de Julho de 2009
                    </rich:toolBarGroup>

                    <rich:toolBarGroup location="right">
                        <script type="text/javascript">printGreeting();</script> <b>[Nome do usuário ativo]</b>
                    </rich:toolBarGroup>

                    <rich:toolBarGroup location="right">
                        <h:form>
                            <rich:dropDownMenu itemClass="rich-item" id="file-menu" styleClass="rich-dropdownmenu">
                                <f:facet name="label">
                                    <h:panelGroup>
                                        <h:outputText value="Minhas Opções"/>
                                        <rich:spacer width="3px"/>
                                        <h:graphicImage url="/infrastructure/images/icons/details-16x16.gif" width="10" height="10"/>
                                    </h:panelGroup>
                                </f:facet>
                                <rich:menuItem value="Opção 1" icon="/infrastructure/images/icons/add-16x16.gif">
                                </rich:menuItem>
                                <rich:menuItem value="Opção 1" icon="/infrastructure/images/icons/add-16x16.gif">
                                </rich:menuItem>
                            </rich:dropDownMenu>
                        </h:form>
                    </rich:toolBarGroup>

                    <rich:toolBarGroup location="right">
                        <h:form>
                            <h:outputLink value="#" id="link" title="#{tooltipmessages.ExitSystem}">
                                #{words.Exit}
                                <rich:componentControl for="exit-confirmation-window"
                                                       attachTo="link" operation="show"
                                                       event="onclick"/>
                            </h:outputLink>
                        </h:form>
                    </rich:toolBarGroup>
                </rich:toolBar>
            </h:form>
        </div>


        <div id="top-section">
            <div class="innertube" style="width:100%">
                <ui:insert name="header-area">
                    <div style="float:left;width:50%">
                        <ui:insert name="header-left-area">
                            <h:form>
                                <h:commandLink action="SYSTEM.goToLogin" style="float:left;">
                                    <h:graphicImage style="margin-right:5px;" border="0"
                                                    url="/infrastructure/images/placeholder-logo.gif"
                                                    alt="#{altmessages.ApplicationLogo}"
                                                    title="#{tooltipmessages.BackToMainPage}"/>
                                </h:commandLink>
                            </h:form>
                            <div style="margin-left:15px;">
                                <h1>Nome do Sistema</h1>
                            </div>
                        </ui:insert>
                    </div>

                    <div style="float:right;width:49%;text-align:right;">
                        <ui:insert name="header-right-area">
                        </ui:insert>
                    </div>
                </ui:insert>
            </div>
        </div>

        <appcommons:applicationStatus/>
    </ui:insert>

    <!-- modal panels -->
    <ui:include src="/infrastructure/general/windows/exit-window.xhtml"/>
</ui:component>